<%@ page import="nusarPruebas.Coordinador" %>



<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'numTrabajador', 'error')} required">
	<label for="numTrabajador">
		<g:message code="coordinador.numTrabajador.label" default="Num Trabajador" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="numTrabajador" type="number" value="${coordinadorInstance.numTrabajador}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'nombre', 'error')} required">
	<label for="nombre">
		<g:message code="coordinador.nombre.label" default="Nombre" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nombre" required="" value="${coordinadorInstance?.nombre}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'carrera', 'error')} required">
	<label for="carrera">
		<g:message code="coordinador.carrera.label" default="Carrera" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="carrera" from="${coordinadorInstance.constraints.carrera.inList}" required="" value="${coordinadorInstance?.carrera}" valueMessagePrefix="coordinador.carrera"/>
</div>

<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'correo', 'error')} required">
	<label for="correo">
		<g:message code="coordinador.correo.label" default="Correo" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="email" name="correo" required="" value="${coordinadorInstance?.correo}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'password', 'error')} required">
	<label for="password">
		<g:message code="coordinador.password.label" default="Password" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="password" required="" value="${coordinadorInstance?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'alumnos', 'error')} ">
	<label for="alumnos">
		<g:message code="coordinador.alumnos.label" default="Alumnos" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${coordinadorInstance?.alumnos?}" var="a">
    <li><g:link controller="alumno" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="alumno" action="create" params="['coordinador.id': coordinadorInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'alumno.label', default: 'Alumno')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: coordinadorInstance, field: 'solicitudes', 'error')} ">
	<label for="solicitudes">
		<g:message code="coordinador.solicitudes.label" default="Solicitudes" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${coordinadorInstance?.solicitudes?}" var="s">
    <li><g:link controller="solicitud" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="solicitud" action="create" params="['coordinador.id': coordinadorInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'solicitud.label', default: 'Solicitud')])}</g:link>
</li>
</ul>

</div>

